package com.dididoctor.patient.Ui.cityList;

import java.util.Comparator;


public class PinyinComparator implements Comparator<CityBean> {

    @Override
    public int compare(CityBean o1, CityBean o2) {
        if (o1.getSortLetters().equals("☆")) {
            return -1;
        } else if (o2.getSortLetters().equals("☆")) {
            return 1;
        } else if (o1.getSortLetters().equals("#")) {
            return -1;
        } else if (o2.getSortLetters().equals("#")) {
            return 1;
        } else {
            return o1.getSortLetters().compareTo(o2.getSortLetters());
        }
    }

}
